package com.ruoyi.volunteer.venue.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.volunteer.venue.mapper.VoluntaryVenueMapper;
import com.ruoyi.volunteer.venue.domain.VoluntaryVenue;
import com.ruoyi.volunteer.venue.service.IVoluntaryVenueService;

/**
 * 服务场所Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-08
 */
@Service
public class VoluntaryVenueServiceImpl implements IVoluntaryVenueService 
{
    @Autowired
    private VoluntaryVenueMapper voluntaryVenueMapper;

    /**
     * 查询服务场所
     * 
     * @param id 服务场所主键
     * @return 服务场所
     */
    @Override
    public VoluntaryVenue selectVoluntaryVenueById(Long id)
    {
        return voluntaryVenueMapper.selectVoluntaryVenueById(id);
    }

    /**
     * 查询服务场所列表
     * 
     * @param voluntaryVenue 服务场所
     * @return 服务场所
     */
    @Override
    public List<VoluntaryVenue> selectVoluntaryVenueList(VoluntaryVenue voluntaryVenue)
    {
        return voluntaryVenueMapper.selectVoluntaryVenueList(voluntaryVenue);
    }

    /**
     * 新增服务场所
     * 
     * @param voluntaryVenue 服务场所
     * @return 结果
     */
    @Override
    public int insertVoluntaryVenue(VoluntaryVenue voluntaryVenue)
    {
        return voluntaryVenueMapper.insertVoluntaryVenue(voluntaryVenue);
    }

    /**
     * 修改服务场所
     * 
     * @param voluntaryVenue 服务场所
     * @return 结果
     */
    @Override
    public int updateVoluntaryVenue(VoluntaryVenue voluntaryVenue)
    {
        return voluntaryVenueMapper.updateVoluntaryVenue(voluntaryVenue);
    }

    /**
     * 批量删除服务场所
     * 
     * @param ids 需要删除的服务场所主键
     * @return 结果
     */
    @Override
    public int deleteVoluntaryVenueByIds(Long[] ids)
    {
        return voluntaryVenueMapper.deleteVoluntaryVenueByIds(ids);
    }

    /**
     * 删除服务场所信息
     * 
     * @param id 服务场所主键
     * @return 结果
     */
    @Override
    public int deleteVoluntaryVenueById(Long id)
    {
        return voluntaryVenueMapper.deleteVoluntaryVenueById(id);
    }
}
